package com.zuipin.enums;

import com.zuipin.entity.product.ProductInfo;

public enum ProductStatus {
	下架(1), 上架(2), 禁用(3), 删除(4), 启用(5);
	private Integer index;
	
	private ProductStatus(Integer index) {
		this.index = index;
	}
	
	public Integer getIndex() {
		return index;
	}
	
	public static ProductStatus changeToErpStatus(short cbsStatus) {
		if (cbsStatus == ProductInfo.YES_EXCHANGE_INTEGRAL) {
			return ProductStatus.上架;
		}
		return ProductStatus.禁用;
	}
}
